<?php

/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| Here you may define all of your model factories. Model factories give
| you a convenient way to create models for testing and seeding your
| database. Just tell the factory how a default model should look.
|
*/


use App\Models\EventStudentCalendarPresent;

$factory->define(EventStudentCalendarPresent::class, function (Faker\Generator $faker) {
    $mobile = '1' . $faker->randomElement([3, 4, 5, 7, 8, 9]);
    for($i = 0; $i < 9; $i++) {
        $mobile = $mobile . $faker->randomDigit;
    }
    return [
        'student_id' => $faker->randomElement(range(1000, 9999)),
        'event_id'   => EventStudentCalendarPresent::EVENT_ID,
        'status'     => $faker->randomElement(array(
            EventStudentCalendarPresent::STATUS_Allow,
            EventStudentCalendarPresent::STATUS_Created,
            EventStudentCalendarPresent::STATUS_Prohibit,
            EventStudentCalendarPresent::STATUS_Post,
            EventStudentCalendarPresent::STATUS_Success,
        )),
        'name'       => $faker->name(),
        'telephone'  => $mobile,
        'address'    => $faker->address,
        'admin_id'   => $faker->randomElement(range(1000, 9999)),
        'express_id' => $faker->numberBetween(1000000000000, 3999999999999)
    ];
});